package com.exam.mapper;
import com.exam.entity.StudentScore;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentScoreRepository extends JpaRepository<StudentScore, Integer> {

    // 根据学生ID分页查询成绩记录
    Page<StudentScore> findByStudentId(Integer studentId, Pageable pageable);

    // 根据学生ID和课程名查询成绩
    List<StudentScore> findByStudentIdAndCourseName(Integer studentId, String courseName);
}